<%@ page import="com.ikun.pojo.TbUser" %><%--
  Created by IntelliJ IDEA.
  User: tande
  Date: 2019/6/20
  Time: 1:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
    TbUser tbUserNow = (TbUser) session.getAttribute("tbUserNow");
%>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- 自适应手机屏幕 -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes"/>

    <title>生机校园帮|首页</title>

    <script src="${ctx}/js/jquery-1.11.0.min.js"></script>
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css">
    <script src="${ctx}/layui/layui.js"></script>
    <script src="${ctx}/layui/layui.all.js"></script>
    <script src="${ctx}/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="${ctx}/css/details.css">
    <script>
        var ctx = "${ctx}";
    </script>
    <c:if test="${tbUserNow!=null}">
        <script>
            var user_id = "<%=tbUserNow.getId() %>";
            var nickname = "<%=tbUserNow.getNickname() %>";
            var user_pic = "<%=tbUserNow.getPic() %>";
            var realname = "<%=tbUserNow.getRealname() %>";
            var account = "<%=tbUserNow.getAccount() %>";
            var sex = "<%=tbUserNow.getSex() %>";
            var email = "<%=tbUserNow.getEmail() %>";
            var phone = "<%=tbUserNow.getPhone() %>";
            var department = "<%=tbUserNow.getDepartment() %>";
            var profession = "<%=tbUserNow.getProfession() %>";
            var classes = "<%=tbUserNow.getClasses() %>";
            var balance = "<%=tbUserNow.getBalance() %>";
        </script>
    </c:if>
    <c:if test="${tbUserNow==null}">
        <script>
            var user_id = 0;
        </script>
    </c:if>

    <script>
        var typename = "${t.type.name}";
        var taskid = "${t.id}";
        var tasktitle = "${t.title}";
        var taskcontent = "${t.content}";
        var taskcreatetime = "${t.createtime}";
        var taskstarttime = "${t.starttime}";
        var taskendtime = "${t.endtime}";
        var taskcardnum = "${t.cardnum}";
        var taskusernum = "${t.usernum}";
        var userid = "${t.user.id}";
        var usernickname = "${t.user.nickname}";
        var userpic = "${t.user.pic}";
        var taskcommentNum = "${t.commentNum}";
    </script>
    <script src="${ctx}/js/details.js" charset="utf-8"></script>
</head>
<body>

<!-- 顶部 -->
<div id="top">
    <div id="head">
        <!-- 网页logo -->
        <div href="index.html" id="logo-text">School Help(SWJD)</div>
        <!-- 搜索框 -->
        <div id="search-box">
            <input type="text" name="search" id="search-content" placeholder="任务、帮手"/>
            <div id="search-button"></div>
        </div>
        <!-- 导航栏 -->
        <ul id="nav">
            <li>
                <a href="${ctx}/index.jsp" class="now-page">首页</a>
            </li>
            <li>
                <a href="" class="new-page">奖品中心</a>
            </li>
            <li>
                <a href="${ctx}/home.jsp" class="new-page">个人中心</a>
            </li>
            <li>
                <a href="javascript:openIframe();" class="new-page">发布任务</a>
            </li>
        </ul>
    </div>
    <div id="top-right">
        <div id="mypic" class="layui-anim layui-anim-rotate" onmouseenter="picOverStyle()"
             onmouseleave="picOutStyle()"></div>
        <div id="myinfo" class="layui-anim layui-anim-fadein" onmouseenter="picOverStyle()"
             onmouseleave="picOutStyle()">
            <div id="info-top">
                <div id="mynickname"><span>嚯哈</span></div>
                <div id="myprofession"><span>移动应用开发</span></div>
                <div id="mybalance"><span>余额：30</span></div>
            </div>
            <div id="info-bottom">
                <a href="">
                    <div id="myhomepage">个人中心</div>
                </a>
                <a href="">
                    <div id="switchaccount">切换账号</div>
                </a>
                <a href="logoutAccount">
                    <div id="logout">退出</div>
                </a>
            </div>
        </div>
        <div id="login-regist-text">
            <div id="login-text"><a href="${ctx}/login.jsp">登录</a></div>
            <div id="login-regist-line">|</div>
            <div id="regist-text"><a href="">注册</a></div>
        </div>
    </div>
</div>

<!-- 中间部分 -->
<div id="middle">
    <div id="middle-center">
        <div id="middle-center-left" class="layui-anim layui-anim-scale">
            <a id="go-back" href="${ctx}/index.jsp"><<返回</a>
            <div id="task-box">
                <div id="task-type"></div>
                <div id="task-title"><span></span></div>
                <div id="task-userpic"></div>
                <div id="task-user-time">
                    <div id="task-nickname"><span></span></div>
                    <div id="task-createtime"><span></span></div>
                </div>
                <div id="task-card-time">
                    <div id="task-cardnum"><span></span></div>
                    <div id="task-starttime"><span></span></div>
                    <div id="task-endtime"><span></span></div>
                </div>
                <div id="task-content">
                    <%-- 任务内容 --%>
                </div>
            </div>
            <div id="comment-box">
                <div id="comment-line">
                    <span id="comment-line-title">校友评论</span>
                    <span id="comment-line-num"></span>
                    <div id="btn-comment-get" onclick="getTask()">帮助ta</div>
                </div>
                <div id="send-comment-box" onclick="showCommentBox(this)">
                    <div id="send-comment-pen-img"></div>
                    <div id="send-comment-box-text">发表评论</div>
                    <div id="send-comment-touser-img"></div>
                </div>
                <div id="sel-comment-box">

                    <%-- 评论 --%>

                </div>
            </div>
        </div>
    </div>
</div>

<!-- 评论弹出层 -->
<div id="show-send-comment-box" class="layui-anim layui-anim-scale">
    <div id="comment-id" style="display: none"></div>
    <div id="help-id" style="display: none"></div>
    <div id="help-title"></div>
    <div id="comment-close" onclick="hideCommentBox()">x</div>
    <div id="user-title">评论</div>
    <textarea id="comment-content" wrap="physical" placeholder="发表评论" oninput="countText()"></textarea>
    <div id="btn-to">@</div>
    <div id="text-num">140</div>
    <div id="btn-comment" onclick="addComment()">评论</div>
</div>

<!-- 底部 -->
<div id="bottom">
    <div id="url">生机校园帮&nbsp;&nbsp;&nbsp;&nbsp;2019&nbsp;&nbsp;©&nbsp;&nbsp;schoolhelp.com</div>
    <div id="develop">开发组：谭德&nbsp;&nbsp;吴山河&nbsp;&nbsp;刘宇昂&nbsp;&nbsp;汪俐</div>
</div>

</body>
</html>
